package com.eastseeway.radioproject.views;

import android.util.Log;

import androidx.databinding.BindingAdapter;
import androidx.databinding.InverseBindingAdapter;
import androidx.databinding.InverseBindingListener;

/**
 * 为自定义控件{@link NumberKeyBoxView}绑定适配器
 * 这种方法可以，但是因为代码少，就放在{@link NumberKeyBoxView#setListeners(NumberKeyBoxView, NumberKeyBoxView.NumberKeyBoxViewClick)}
 * 这个位置了，而且把绑定适配器的代码进行了省略，一般也用不上第二个参数
 */
public class NumberKeyBoxViewBindingAdapter {

    private static String TAG = "NumberKeyBoxViewBindingAdapter";

//    @BindingAdapter(value = {"OnPasswordChange", "onAttrChange"},
//            requireAll = false)
//    public static void setListeners(NumberKeyBoxView v
//            , NumberKeyBoxView.NumberKeyBoxViewClick numberKeyBoxViewClick
//            , InverseBindingListener listener){
//        if (listener == null){
//            v.setNumberKeyBoxViewClick(numberKeyBoxViewClick);
//        }else {
//            v.setNumberKeyBoxViewClick(value -> {
//                if (numberKeyBoxViewClick != null) {
//                    numberKeyBoxViewClick.click(value);
//                }
//                listener.onChange();
//            });
//        }
//
//    }


}
